<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<HyperLocal.Core.LocalOrbUser>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Edit
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Edit</h2>
    <%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>
<form method="post" enctype="multipart/form-data" action="/Profile/Edit">
<%= Html.Hidden("id", Model.LocalOrbUserId, new {@value= Model.LocalOrbUserId})%>
    <div>
        <h3>
            Edit User Information</h3>
        <fieldset>
            <legend>Fields</legend>
            <p>
                <label for="LocalOrbUserId">
                    LocalOrbUserId:</label>
                <%= Html.TextBox("LocalOrbUserId", Model.LocalOrbUserId, new { @readonly=true})%>
                <%= Html.ValidationMessage("LocalOrbUserId", "*")%>
            </p>
            <p>
                <label for="UserName">
                    UserName:</label>
                <%= Html.TextBox("UserName", Model.UserName, new { @readonly=true})%>
                <%= Html.ValidationMessage("UserName", "*")%>
            </p>
            <p>
                <label for="Password">
                    Password:</label>
                <%= Html.TextBox("Password", Model.Password, new { @readonly=true})%>
                <%= Html.ValidationMessage("Password", "*")%>
            </p>
            <p>
                <label for="Email">
                    Email:</label>
                <%= Html.TextBox("Email", Model.Email, new { @readonly=true})%>
                <%= Html.ValidationMessage("Email", "*")%>
            </p>
            <p>
                <label for="Active">
                    Active:</label>
                <%= Html.TextBox("Active", Model.Active, new { @readonly=true})%>
                <%= Html.ValidationMessage("Active", "*")%>
            </p>
            <p>
                <label for="Deleted">
                    Deleted:</label>
                <%= Html.TextBox("Deleted", Model.Deleted, new { @readonly=true})%>
                <%= Html.ValidationMessage("Deleted", "*")%>
            </p>
            <p>
                <label for="DateCreated">
                    DateCreated:</label>
                <%= Html.TextBox("DateCreated", String.Format("{0:g}", Model.DateCreated), new { @readonly=true})%>
                <%= Html.ValidationMessage("DateCreated", "*")%>
            </p>
            <p>
                <label for="DateModified">
                    DateModified:</label>
                <%= Html.TextBox("DateModified", String.Format("{0:g}", Model.DateModified), new { @readonly=true})%>
                <%= Html.ValidationMessage("DateModified", "*")%>
            </p>
            <p>
                <label for="DateDeleted">
                    DateDeleted:</label>
                <%= Html.TextBox("DateDeleted", String.Format("{0:g}", Model.DateDeleted), new { @readonly=true})%>
                <%= Html.ValidationMessage("DateDeleted", "*")%>
            </p>
            <p>
                <label for="IsApproved">
                    IsApproved:</label>
                <%= Html.TextBox("IsApproved", Model.IsApproved, new { @readonly=true})%>
                <%= Html.ValidationMessage("IsApproved", "*")%>
            </p>
            <p>
                <label for="SecurityQuestion">
                    SecurityQuestion:</label>
                <%= Html.TextBox("SecurityQuestion", Model.SecurityQuestion)%>
                <%= Html.ValidationMessage("SecurityQuestion", "*")%>
            </p>
            <p>
                <label for="SecurityAnswer">
                    SecurityAnswer:</label>
                <%= Html.TextBox("SecurityAnswer", Model.SecurityAnswer)%>
                <%= Html.ValidationMessage("SecurityAnswer", "*")%>
            </p>
            <p>
                <label for="LocalOrbCommunityId">
                    LocalOrbCommunityId:</label>
                <%= Html.TextBox("LocalOrbCommunityId", Model.LocalOrbCommunityId, new { @readonly=true})%>
                <%= Html.ValidationMessage("LocalOrbCommunityId", "*")%>
            </p>
            <p>
                <label for="Comment">
                    Comment:</label>
                <%= Html.TextBox("Comment", Model.Comment)%>
                <%= Html.ValidationMessage("Comment", "*")%>
            </p>
        </fieldset>
        <br />
        <h3>
            Edit Profile Information
        </h3>
        <fieldset>
            <%
        var profile = Model.LocalOrbProfiles[0]; %>
            <p>
                <label for="FirstName">
                    FirstName:</label>
                <%= Html.TextBox("FirstName", profile.FirstName)%>
                <%= Html.ValidationMessage("FirstName", "*")%>
            </p>
            <p>
                <label for="LastName">
                    LastName:</label>
                <%= Html.TextBox("LastName", profile.LastName)%>
                <%= Html.ValidationMessage("LastName", "*")%>
            </p>
            <p>
                <label for="DateOfBirth">
                    DateOfBirth:</label>
                <%= Html.TextBox("DateOfBirth", profile.DateOfBirth)%>
                <%= Html.ValidationMessage("DateOfBirth", "*")%>
            </p>
            <p>
                <label for="SocialSecurityNumber">
                    Social Security Number:</label>
                <%= Html.TextBox("SocialSecurityNumber", profile.SocialSecurityNumber)%>
                <%= Html.ValidationMessage("SocialSecurityNumber", "*")%>
            </p>
            <p>
                <label for="ProfileQuote">
                    ProfileQuote:</label>
                <%= Html.TextArea("ProfileQuote", profile.ProfileQuote, 10, 40, 10)%>
                <%= Html.ValidationMessage("ProfileQuote", "*")%>
            </p>
            <p>
                <label for="ProfileImageLocation">
                    UpLoad a new profile image:</label>
                <input type="file" id="ProfileImageLocation" name="ProfileImageLocation" />
                <%= Html.ValidationMessage("ProfileImageLocation", "*")%>
            </p>
        </fieldset>
        <p>
            <input type="submit" value="Save" />
        </p>
    </div>
    </form>
    <div>
        <%=Html.ActionLink("Back to List", "Index") %>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="StyleInjection" runat="server">
</asp:Content>
